import request from '@/utils/request'

// 查询订单记录列表
export function listOrder(query) {
  return request({
    url: '/system/order/list',
    method: 'get',
    params: query
  })
}

// 查询订单记录列表
export function listOrder2(query) {
  return request({
    url: '/system/order/noReceiptList',
    method: 'get',
    params: query
  })
}

// 查询订单记录详细
export function getOrder(id) {
  return request({
    url: '/system/order/' + id,
    method: 'get'
  })
}

// 新增订单记录
export function addOrder(data) {
  return request({
    url: '/system/order',
    method: 'post',
    data: data
  })
}

// 修改订单记录
export function updateOrder(data) {
  return request({
    url: '/system/order',
    method: 'put',
    data: data
  })
}

// 删除订单记录
export function delOrder(id) {
  return request({
    url: '/system/order/' + id,
    method: 'delete'
  })
}

// 新增称重记录
export function addPiece(data) {
  return request({
    url: '/system/weigh/addPiece',
    method: 'post',
    data: data
  })
}
